﻿using System;
using System.Globalization;
using System.Windows;
using System.Windows.Data;

namespace SkiTracker.Converter
{
    public class BoolenToOpacityConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if (value is bool && targetType == typeof(double))
            {
                return (bool)value ? 1 : 0.3;
            }
            return DependencyProperty.UnsetValue;
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
